<?php
//
//  VictoryCMS - Content managment system and framework.
//  Copyright (C) 2009  Lewis Gunsch
//
//  This file is part of VictoryCMS.
//  
//  VictoryCMS is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  VictoryCMS is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License
//  along with VictoryCMS.  If not, see <http://www.gnu.org/licenses/>.

/**
 * VictoryCMS - DisplayablePage Interface
 * 
 * @license http://www.gnu.org/licenses/gpl.html
 * @author Lewis Gunsch
 * @filesource
 * @package DisplayablePages
 */

/**
 * An interface for displaying a page with the page displayer object.
 * This interface contains the functions required for a page to be 
 * displayable by a Page displayer object.	
 * 
 * @package DisplayablePages
 * 
 * @todo we want to provide set of events that can be observed 
 * with associated states in a finite state machine.
 **/
interface DisplayablePage {
 
 	/**
	 * Returns the title of the DisplayablePage.
	 * This will be used as the browser window's title, 
	 * and in clean looking url's.
	 * 
	 * @return String The title of the page
	 **/
 	public function getTitle();
	
	/**
	 * Returns the name of the DisplayablePage, in 
	 * alphanumeric format.
	 * This represents the page name as seen in a link.
	 * This should only contain alphanumeric characters.
	 * 
	 * @return String The name of the page.
	 **/
	public function getName();
	
	/**
	 * Returns a short text description of a DisplayablePage.
	 * This will be used for a tool tip, link description, and other places a 
	 * description is used.
	 * 
	 * @return String A short description of the page
	 **/
	public function getDescription();
	
	/**
	 * Returns a comma seperated list of describing
	 * meta keywords in a string.
	 * 
	 * @return String A comma seperated keyword string
	 **/
	public function getKeywords();

	
	/**
	 * Returns any extra header tags and links to be placed 
	 * into the head section of the page.
	 * 
	 * @return String The css stylesheet for the page in a string
	 */
	public function getHeaderInfo();
	
	/**
	 * Returns the html content of the page. The content should not contain 
	 * the template, just the page content not including navigation. The current 
	 * page parameter should be set to the relative page path calling this function.
	 *
	 * @param String The current relative page path calling this function.
	 * 
	 * @return String A string containing the html page content
	 **/
	 public function renderPage( $currentPage );
	 
	/**
	 * Called before any content is retrieved. This method is run before the page 
	 * is displayed and before any content is retrieved. This method is meant
	 * to let the page do any necessary preprocessing.
	 **/
	 public function pagePreProcess();
	  
	/**
	 * Returns the minimum necessary permissions needed to be able to view this page.
	 * 
	 * @return Permission A permission object with permission set.
	 **/
	 public function getPagePermissionLevel();
}
?> 
